package br.com.condominio.controller;

import java.sql.SQLException;
import java.util.List;

import br.com.condominio.model.dao.HistoricoVisitaDAO;
import br.com.condominio.view.vo.HistoricoVisitaVO;
import br.com.condominio.view.vo.VisitaVO;

public class HistoricoVisitaController {

	private HistoricoVisitaDAO dao;

	public HistoricoVisitaController() throws ClassNotFoundException,
			SQLException {
		this.dao = new HistoricoVisitaDAO();
	}

	public boolean criarHistoricoVisita(VisitaVO visita, int ultimaVisita) throws SQLException,
			ClassNotFoundException {
		return (dao.criarHistoricoVisita(visita, ultimaVisita));
	}

	public List<HistoricoVisitaVO> getAllHistoricoVisitas() throws SQLException,
			ClassNotFoundException {
		return (dao.getAllHistoricoVisitas());
	}


	public HistoricoVisitaVO getHistoricoVisitaByID(int id) throws SQLException,
			ClassNotFoundException {
		return (dao.getHistoricoVisitaByID(id));
	}
}
